package com.yx.learn.domain;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Log entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tlog", catalog = "yx_01")
public class Log implements java.io.Serializable {

	// Fields

	private Integer id;
	private String tableName;
	private Integer contentId;
	private String content;
	private Integer userId;
	private Timestamp createTime;

	// Constructors

	/** default constructor */
	public Log() {
	}

	/** minimal constructor */
	public Log(Integer id, String tableName, Integer contentId, Integer userId,
			Timestamp createTime) {
		this.id = id;
		this.tableName = tableName;
		this.contentId = contentId;
		this.userId = userId;
		this.createTime = createTime;
	}

	/** full constructor */
	public Log(Integer id, String tableName, Integer contentId, String content,
			Integer userId, Timestamp createTime) {
		this.id = id;
		this.tableName = tableName;
		this.contentId = contentId;
		this.content = content;
		this.userId = userId;
		this.createTime = createTime;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	@GeneratedValue
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "tableName", nullable = false, length = 25)
	public String getTableName() {
		return this.tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	@Column(name = "contentID", nullable = false)
	public Integer getContentId() {
		return this.contentId;
	}

	public void setContentId(Integer contentId) {
		this.contentId = contentId;
	}

	@Column(name = "content", length = 5000)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "userID", nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "createTime", nullable = false, length = 0)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

}